import request from '@/utils/request'

// 查询角色列表
export function listPark(query) {
  return request({
    url: '/park/sys',
    method: 'get',
    params: query
  })
}

export function getparkSpace() {
  return request({
    url: '/park/space/list',
    method: 'get'
  })
}


// 删除同步信息
export function delSys(SysId) {
  return request({
    url: '/park/space/delete/' + SysId,
    method: 'delete'
  })
}

// 删除重复车位
export function delParkingSpace(SpaceId) {
  return request({
    url: '/park/space/deletespace/' + SpaceId,
    method: 'delete'
  })
}

// 删除显示两条一样的车位
export function delParkingSpaces(SpaceId) {
  return request({
    url: '/park/space/deletespaces/' + SpaceId,
    method: 'delete'
  })
}


// 删除成功后没有业务信息
export function delSysPark(SysId) {
  return request({
    url: '/park/space/deletes/' + SysId,
    method: 'delete'
  })
}

//车位列表
export function getparkingSpace(query) {
  return request({
    url: '/park/space',
    method: 'get',
    params: query,
  })
}

//订单列表
export function getorder(query) {
  return request({
    url: '/order/list',
    method: 'get',
    params: query,
  })
}

//订单详情
export function getorderSn(orderSn) {
  return request({
    url: '/order/get/'+orderSn,
    method: 'get',
  })
}

// 修改用户
export function updateOrder(data) {
  return request({
    url: '/order',
    method: 'post',
    data: data
  })
}


// 清分商户
export function selectMerchant() {
  return request({
    url: '/merchant/list',
    method: 'get',
  })
}


//清分汇总列表
export function getorderClear(query) {
  return request({
    url: '/order/clear/list',
    method: 'get',
    params: query,
  })
}

//清分汇总修改
export function getUpdateClear(clearId) {
  return request({
    url: '/order/clear/'+clearId,
    method: 'get',
  })
}

